package com.ruoyi.yipaiju.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yipaiju.mapper.DemandOrderMapper;
import com.ruoyi.yipaiju.domain.DemandOrder;
import com.ruoyi.yipaiju.service.IDemandOrderService;

/**
 * fo_demand_orderService业务层处理
 * 
 * @author liuwp
 * @date 2023-03-01
 */
@Service
public class DemandOrderServiceImpl implements IDemandOrderService 
{
    @Autowired
    private DemandOrderMapper demandOrderMapper;

    /**
     * 查询fo_demand_order
     * 
     * @param id fo_demand_order主键
     * @return fo_demand_order
     */
    @Override
    public DemandOrder selectDemandOrderById(Long id)
    {
        return demandOrderMapper.selectDemandOrderById(id);
    }

    /**
     * 查询fo_demand_order列表
     * 
     * @param demandOrder fo_demand_order
     * @return fo_demand_order
     */
    @Override
    public List<DemandOrder> selectDemandOrderList(DemandOrder demandOrder)
    {
        return demandOrderMapper.selectDemandOrderList(demandOrder);
    }
    @Override
    public List<DemandOrder> selectDemandOrderList1(DemandOrder demandOrder)
    {
        return demandOrderMapper.selectDemandOrderList1(demandOrder);
    }

    /**
     * 根据业务主键查询一条记录：fo_demand_order
     *
     * @param demandOrder fo_demand_order
     * @return fo_demand_order
     */
    @Override
    public DemandOrder selectOneDemandOrder(DemandOrder demandOrder)
    {
        return demandOrderMapper.selectOneDemandOrder(demandOrder);
    }

    /**
     * 新增fo_demand_order
     * 
     * @param demandOrder fo_demand_order
     * @return 结果
     */
    @Override
    public int insertDemandOrder(DemandOrder demandOrder)
    {
        demandOrder.setCreateTime(DateUtils.getNowDate());
        return demandOrderMapper.insertDemandOrder(demandOrder);
    }

    /**
     * 修改fo_demand_order
     * 
     * @param demandOrder fo_demand_order
     * @return 结果
     */
    @Override
    public int updateDemandOrder(DemandOrder demandOrder)
    {
        demandOrder.setUpdateTime(DateUtils.getNowDate());
        return demandOrderMapper.updateDemandOrder(demandOrder);
    }

    @Override
    public int updateDemandOrderCondition(DemandOrder demandOrder, DemandOrder demandOrderCondition)
    {
                demandOrder.setUpdateTime(DateUtils.getNowDate());
        return demandOrderMapper.updateDemandOrderCondition(demandOrder, demandOrderCondition);
    }

    /**
     * 批量删除fo_demand_order
     * 
     * @param ids 需要删除的fo_demand_order主键
     * @return 结果
     */
    @Override
    public int deleteDemandOrderByIds(Long[] ids)
    {
        return demandOrderMapper.deleteDemandOrderByIds(ids);
    }

    /**
     * 删除fo_demand_order信息
     * 
     * @param id fo_demand_order主键
     * @return 结果
     */
    @Override
    public int deleteDemandOrderById(Long id)
    {
        return demandOrderMapper.deleteDemandOrderById(id);
    }

    /**
     * 条件删除fo_demand_order
     *
     * @param demandOrder fo_demand_order
     * @return 结果
     */
    @Override
    public int deleteDemandOrderByCondition(DemandOrder demandOrder)
    {
        return demandOrderMapper.deleteDemandOrderByCondition(demandOrder);
    }

}
